//
//  MenuList_SecTableViewCell.m
//  Cook Street
//
//  Created by dllo on 15/8/19.
//  Copyright (c) 2015年 LANOU. All rights reserved.
//

#import "MenuList_SecTableViewCell.h"
#define SCREEN_WIDTH self.bounds.size.width
#define SCREEN_HEIGHT self.bounds.size.height
#import "UIImageView+WebCache.h"



@implementation MenuList_SecTableViewCell



-(id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        
        self.label = [[UILabel alloc]initWithFrame:CGRectMake(20, 20, SCREEN_WIDTH - 40, 30)];
        self.label.font = [UIFont systemFontOfSize:16];
        self.label.numberOfLines = 0;
        [self.contentView addSubview:self.label];
        
        
        self.img = [[UIImageView alloc]initWithFrame:CGRectMake(20, 70, 180, 180)];
        [self.contentView addSubview:self.img];
        
        
    }
    return self;
}




-(void)get:(CookModel *)get
{
    self.label.text = get.step;
    
    
    
    self.label.frame = CGRectMake(20, 20, SCREEN_WIDTH - 40, get.height);
    
    [self.img sd_setImageWithURL:[NSURL URLWithString:get.img]placeholderImage:[UIImage imageNamed:@"default"]];
    self.img.frame = CGRectMake(20, get.height + 40, 180, 180);
    
    
}





/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

@end
